<?php
    
    class Session implements iModel {
    	
		public $sessionStart;
		public $user;
		
		public function setSessionStart($dateTime) {
       		$this->sessionStart = $dateTime;
		}
		
		public function getSessionStart() {
       		return $this->sessionStart;
		}
		
		public function setUser($user) {
				
       		$this->user = $user;
			// $this->user->setIdentification($user->identification);
			// $this->user->setIdentificationType($user->identificationType);
			// $this->user->setEmail($user->email);
			// $this->user->setName($user->name);
			// $this->user->setBirthDate($user->birthDate);
			// $this->user->setPhone($user->phone);
			// $this->user->setPassword($user->password);
		}
	
		public function getUser() {
				
       		// $this->user->getIdentification();
			// $this->user->getIdentificationType();
			// $this->user->getEmail();
			// $this->user->getName();
			// $this->user->getBirthDate();
			// $this->user->getPhone();
			// $this->user->getPassword();
			
			return $this->user;
		}
		
		public function JSONToObject($sessionJSON) {
				
			$this->user = new User();
			
			$this->setSessionStart($sessionJSON->sessionStart);
			$this->user->setIdentification($sessionJSON->user->identification);
			$this->user->setIdentificationType($sessionJSON->user->identificationType);
			$this->user->setEmail($sessionJSON->user->email);
			$this->user->setName($sessionJSON->user->name);
			$this->user->setBirthDate($sessionJSON->user->birthDate);
			$this->user->setPhone($sessionJSON->user->phone);
			$this->user->setPassword($sessionJSON->user->password);
			
		}
    }
    
?>